// 定义与Java中BaseResponse<T>对应的前端数据结构
export interface BaseResponse {
  code: number
  message: string
}

// 单个用户对象的ts类型
export interface Article {
  id: number
  title: string
  shortTitle: string
  articleAvatar: string
  summary: string
  content: string
  categoryName: string
  userName: string
  createTime: string
}

export interface ArticleAddRequest {
  title?: string
}

export interface ArticleQueryRequest {
  title?: string
}

export interface ArticleUpdateRequest {
  id: number
  title?: string
  content?: string
}
export interface PageArticle extends BaseResponse {
  data: {
    current?: number
    pages?: number
    records?: Array<Article>
    size?: number
    total?: number
  }
}

export interface DeleteRequest {
  id: number
}
